<?php
//获取当前域名
if(domain()){$app_name	= "com";}else{$app_name = "index";}
//定义项目名称和路径
define('APP_NAME', $app_name);
// 定义ThinkPHP框架路径
if(!defined('THINK_PATH')){define('THINK_PATH', './ThinkPHP');}
if(!defined('SITE_PATH')){define('SITE_PATH', getcwd());}
if(!defined('APP_PATH')){define('APP_PATH', SITE_PATH . '/apps/' . APP_NAME);}
// 加载框架入口文件
require(THINK_PATH."/ThinkPHP.php");
//应用程序初始化
App::run();

function domain(){
	$host	= $_SERVER['HTTP_HOST'];
	if($host == "www.9535.cn" || $host == "9535.cn") return false;
	$hostarr	= explode('.',$host);
	$domain	= $hostarr["0"];
	return	$domain;
}
?>